package lanou3g.myfirstapp36kr.activity;

import android.content.Intent;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import lanou3g.myfirstapp36kr.R;
import lanou3g.myfirstapp36kr.adapter.LeadAdapter;
import lanou3g.myfirstapp36kr.base.BaseActivity;

/**
 * Created by dllo on 16/9/4.
 */
public class LeadActivity extends BaseActivity {
    private ViewPager viewPager;
    private LeadAdapter adapter;
    private Button button;

    @Override
    protected int getLayout() {
        return R.layout.activity_lead;
    }

    @Override
    protected void initView() {
        button = (Button) findViewById(R.id.btn_go_in);
        viewPager = (ViewPager) findViewById(R.id.view_pager_lead);
        adapter = new LeadAdapter(this);
        viewPager.setAdapter(adapter);

    }

    @Override
    protected void initData() {
        button.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(LeadActivity.this,MainActivity.class);
                startActivity(intent);
                finish();
            }
        });

    }
}
